package com.java.model;

import java.util.List;

import javax.swing.table.DefaultTableModel;

import com.java.entity.Timeslot;

/**
* @ClassName: DoctorTableModel
* @Description: 坐诊时间表格映射实体类
* @author ChenJiaLu
* @date 2023年12月29日 上午10:50:30
*
 */
public class TimeslotTableModel extends DefaultTableModel {  
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public TimeslotTableModel(List<Timeslot> data) {  
        super(new Object[]{"坐诊医生", "周一", "周二", "周三", "周四", "周五", "周六", "周日"}, 0);
        for (Timeslot doc : data) {  
            addRow(new Object[]{
            		doc.getDoctorName(), 
            		doc.getDay1(),
            		doc.getDay2(),
            		doc.getDay3(),
            		doc.getDay4(),
            		doc.getDay5(),
            		doc.getDay6(),
            		doc.getDay7()
            		});
        }  
    } 
	
	@Override
	public boolean isCellEditable(int row, int column) {
		return false;
	} 
}